import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

// 导入Element Plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 导入腾讯地图组件
import tlbsMapVue from 'tlbs-map-vue'

// 导入全局样式
import './styles/index.css'

const app = createApp(App)

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(createPinia())
app.use(router)
app.use(ElementPlus)
// 注册腾讯地图组件
app.use(tlbsMapVue, {
  key: '5VKBZ-EEECB-QQKUF-N5AIR-F2LT6-2XF4Q', // 用户提供的腾讯地图API密钥
  v: '1.exp',
  protocol: 'https'
})

app.mount('#app')
